/**
 *
 */
package com.cj.webapp.common.utils;

import com.cj.framework.core.util.SpringContextUtils;
import com.cj.webapp.common.sign.ISignVerify;


/**0
 * 服务接口调用公共类
 * @author lhg
 *
 */
public class WSUtil {
    
	private static ISignVerify signVerify = (ISignVerify) SpringContextUtils.getBeanByClass(ISignVerify.class);


	/**
	 * 对参数进行加签
	 */
	private static Object[] encapSignData(Object[] params) {
		if (params == null) {
			return null;
		}
		String parnterId = "0000";
		params[0] = parnterId;
		
		params[params.length-2] = UtilDatetime.getTimeString();
		StringBuffer bizData = new StringBuffer();
		for (int i = 1; i < params.length-1; i++) {
			bizData.append((String)params[i]);
		}
        String signData = signVerify.signData(parnterId, bizData.toString());
		params[params.length-1] = signData;
		return params;
	}

}
